package com.so206.service.impl;

import com.so206.mapper.SmsConfigMapper;
import com.so206.po.SmsConfig;
import com.so206.service.SMSConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 短信和通知配置
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class SMSConfigImpl implements SMSConfig {

    @Autowired
    private SmsConfigMapper mapper;

    @Override
    public SmsConfig get_config(Long id) {
        return mapper.selectByPrimaryKey(id);
    }

    @Override
    public void update_config(SmsConfig config) {
        mapper.updateByPrimaryKeySelective(config);
    }

}
